package com.business.api.official.toursism.websitenews.service;

import com.business.api.official.toursism.websitenews.dto.WebsiteNewsApiDTO;
import com.business.api.official.toursism.websitenews.from.WebsiteNewsApiSaveFrom;
import com.business.api.official.toursism.websitenews.from.WebsiteNewsApiUpdateFrom;
import com.business.api.official.toursism.websitenews.query.WebsiteNewsApiPageQuery;
import com.business.api.official.toursism.websitenews.query.WebsiteNewsApiQuery;
import com.business.api.official.toursism.websitenews.vo.WebsiteNewsApiBriefPageVO;
import com.business.api.official.toursism.websitenews.vo.WebsiteNewsApiDetailListVO;
import com.business.api.official.toursism.websitenews.vo.WebsiteNewsApiDetailPageVO;
import com.business.system.official.toursism.websitenews.entity.WebsiteNews;
import com.seed.core.exception.ServiceException;
import com.seed.core.pojo.service.SeedApiService;

/**
 * @description 乌镇新闻
 * @author CodeGenerator
 * @date   2025-01-25
 * @version V1.0
 */
public interface WebsiteNewsApiService extends SeedApiService<WebsiteNews>{

    /**
     * 持久化
     *
     * @param websiteNewsFrom 需要保存的对象
     * @return id，如果保存失败返回空字符串
     * @throws ServiceException 业务层异常
     */
    WebsiteNewsApiDTO save(WebsiteNewsApiSaveFrom websiteNewsFrom) throws ServiceException;

    /**
     * 部分更新
     *
     * @param websiteNewsFrom 需要更新的对象
     * @return 是否成功
     * @throws ServiceException 业务层异常
     */
    WebsiteNewsApiDTO updateSelectiveById(WebsiteNewsApiUpdateFrom websiteNewsFrom) throws ServiceException;

    /**
     * 获取全部
     *
     * @param query 查询条件
     * @return 详情VOList
     * @throws ServiceException 业务层异常
     */
    WebsiteNewsApiDetailListVO listAll(WebsiteNewsApiQuery query) throws ServiceException;

    /**
     * 简略对象条件查询
     *
     * @param query 查询条件
     * @return 查询出来的简略对象
     * @throws ServiceException 业务层异常
     */
    WebsiteNewsApiBriefPageVO getBriefPageVO(WebsiteNewsApiPageQuery query) throws ServiceException;

    /**
     * 详细对象条件查询
     *
     * @param query 查询条件
     * @return 查询出来的详细对象
     * @throws ServiceException 业务层异常
     */
    WebsiteNewsApiDetailPageVO getDetailPageVO(WebsiteNewsApiPageQuery query) throws ServiceException;

    /**
     * 根据标题查询文章
     *
     * @param title 标题名称
     * @return 文章详情
     */
    WebsiteNewsApiDetailListVO listByTitle(String title) throws ServiceException;
}
